package com.yxy.chatserver.domain.po;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 聊天消息模型类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseMessage implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 消息ID
     */
    private String id;

    /**
     * 好友ID
     */
    private Long friendId;
    
    /**
     * 发送者ID
     */
    private String fromUserId;
    
    /**
     * 接收者ID
     */
    private String toUserId;
    
    /**
     * 消息类型（text/image/file等）
     */
    private String type;
    
    /**
     * 发送时间
     */
    private LocalDateTime sendTime;
    
    /**
     * 消息状态（sent/delivered/read等）
     */
    private String status;

    // 拓展缓存字段
    private String fromUserNickname;
    private String fromUserAvatar;
    private String toUserNickname;
    private String toUserAvatar;
}